n = int(input())
bn = bin(n)
sn = str(bn)
sn = sn.replace('0b', '')
print(sn.count('0'))
